
<%--
    Document   : rptAsistencia_Alumno
    Created on : 10/11/2008, 07:41:17 PM
    Author     : Lizardo Rios Villavicencio
--%>
<%@ page import="java.util.ArrayList, org.me.codigo.Matematico, org.me.codigo.Baldor" %>
<%@ page import="agb.Modelo.Utilidades" %>
<%@ page import="agb.Modelo.Asistencias" %>
<%@ page import="java.util.List" %>

<%@ page session="true" %>

<%@ page errorPage="../../../../../error.jsp?from=rptAsistencia_Alumno.jsp" %>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<%@taglib  prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib  prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %> 
<!--  pageEncoding="ISO8859-1"  -->
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">

<html>
    <head>
        <%
Utilidades oUtilidad = new Utilidades();
oUtilidad =  Utilidades.GradoSeccionAlumno((Integer)request.getAttribute("codigo"));
List<Asistencias> fechasNoAsistencia = new ArrayList<Asistencias>();
fechasNoAsistencia = (List<Asistencias>)request.getAttribute("lista");
int valor = 0, f=0,a=0,j=0,t = 0;




%>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    
        <link href="/SistemaWebAGB_2.0/dinamica/css/admin_1.css" rel="stylesheet" type="text/css" />
        <link href="/SistemaWebAGB_2.0/dinamica/css/alumno.css" rel="stylesheet" type="text/css" />
		<link href="/SistemaWebAGB_2.0/dinamica/css/style.css" rel="stylesheet" type="text/css" />
       
        <title>Reporte Horario Por Profesor</title>

        <script language="JavaScript">
             function imprimir() {
                window.parent.frames[5].focus();
                window.print();
            }
        </script>
        <style type="text/css">
            TABLE {
                /*padding:2px;*/
                /*border-color:#0A01F9; */
            }
            TH { border-color:#435C9F; }
            TR { border-color:#435C9F; }
            TD { border-color:#435C9F; }
        </style>
    </head>

    <body>
        <input type=button value="Imprimir" onClick="imprimir()" />
        <br/><br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td rowspan="2" align="center"><img src="dinamica/img/logo.jpg" width="50" height="50"></td>
                <td align="center" valign="bottom"><font face="arial" size="5"><b>I.E. ALEXANDER GRAHAM BELL</b></font></td>
            </tr>
            <tr>
                <td align="center" valign="top"><font face="arial" size="4"><b>Reporte Asistencia De Alumnos</b></font></td>
            </tr>
        </table>
        <br/>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
<td >&nbsp;</td>
            </tr>
            <tr>
                <td height="1">&nbsp;</td>
            </tr>
        </table>
        <table width="85%"  cellpadding="2" cellspacing="0" id="tabla" align="center">
 <tr>
   <td align="center" colspan="3" CLASS="titulo">Nombre:</td>
   <td align="center" colspan="3"CLASS="contenido">${requestScope.nombre}&nbsp;</td>
 </tr>
 <tr>
                               <td width="15%" align="center" colspan="3" CLASS="titulo">Nivel: &nbsp;   </td>

                                <td width="15%" align="center" colspan="3"CLASS="contenido"><%=oUtilidad.getNivel() %>&nbsp;   </td>

                            </tr>

                            <tr class="contenido">
                               <td width="15%" align="center" CLASS="titulo">Grado: &nbsp;   </td>
                                <td width="15%" align="center" CLASS="txtBase"> <%=oUtilidad.getGrado() %>&nbsp;   </td>
                                <td width="15%" align="center" CLASS="titulo">Secci&oacute;n&nbsp;   </td>
                                <td width="15%" align="center" CLASS="txtBase"> <%=oUtilidad.getSeccion() %>&nbsp;   </td>
                                <td width="15%" align="center" CLASS="titulo">A&ntilde;o: &nbsp;   </td>
                                <td width="15%" align="center" CLASS="txtBase"> <%=oUtilidad.getAnioMatriculas() %>&nbsp;   </td>
                            </tr>



                    </table>
                <br>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="6" height="233"></td>
                <td width="484" height="80" valign="top"><table border="1" align="center" id="box-table-a">
                  <tr>
                      <th colspan="5" align="center">${requestScope.periodo}</th>
                  </tr>
                  <tr>
                    <th align="center">LUN</th>
                    <th align="center">MAR</th>
                    <th align="center">MIE</th>
                    <th align="center">JUE</th>
                    <th align="center">VIE</th>
                  </tr>
                  <c:set var="com" value="${requestScope.inicio - 1}"/>
                  <c:set var="val" value="0"/>
                  <c:set value="${fn:length(requestScope.lista)}" var="size"/>
                 
                  <c:forEach var="sem"  begin="1" end="5">
                    <tr>
                      <c:forEach var="dia" begin="1" end="5">
                        <c:if test="${dia <= com}">
                          <td>&nbsp; </td>
                        </c:if>
                        <c:if test="${dia > com}">
                          <%String bgcolor = "";
                          if(fechasNoAsistencia.size()<=valor){

                            %>
                            <td>&nbsp; </td>
                            <%}else{
                                if(fechasNoAsistencia.get(valor).getEstado_asistencia().equalsIgnoreCase("A")){
                                    a++;
                                    bgcolor = "#DAF4F8";
                                }
                                if(fechasNoAsistencia.get(valor).getEstado_asistencia().equalsIgnoreCase("F")){
                                    f++;
                                    bgcolor = "#FDC6CF";
                                }
                                if(fechasNoAsistencia.get(valor).getEstado_asistencia().equalsIgnoreCase("J")){
                                    j++;
                                    bgcolor = "#9EE4CA";
                                }
                                if(fechasNoAsistencia.get(valor).getEstado_asistencia().equalsIgnoreCase("T")){
                                    t++;
                                    bgcolor = "#B4B4B4";
                                }
                                %>
                                <td align="center" bgcolor="<%=bgcolor%>"><%=fechasNoAsistencia.get(valor).getDia() + "/" + fechasNoAsistencia.get(valor).getMes() + "<BR>" + fechasNoAsistencia.get(valor).getEstado_asistencia() %> </td>
                            <%valor++;}%>                   
                        </c:if>
                      </c:forEach>
                      <c:set var="com" value="0"/>
                    </tr>
                  </c:forEach>
                </table>
                    
                </td>
                <td width="220" height="50">
                  <table width="200" border="0" align="center" id="tabla">
                    <tr>
                      <td width="68" bgcolor = "#DAF4F8" align="center"><%=a++%></td>
                      <td width="122" align="center" valign="middle">Asistencia</td>
                    </tr>
                    <tr>
                        <td bgcolor = "#FDC6CF" align="center"><%=f++%></td>
                      <td align="center" valign="middle">Falta</td>
                    </tr>
                    <tr>
                      <td bgcolor = "#9EE4CA" align="center"><%=j++%></td>
                      <td align="center" valign="middle">Justificación</td>
                    </tr>
                    <tr>
                      <td bgcolor = "#B4B4B4" align="center"><%=t++%></td>
                      <td align="center" valign="middle">Tardanza</td>
                    </tr>
                  </table>
                <p>&nbsp;</p></td>
            </tr>
            <tr>
                <td height="1">&nbsp;</td>
            </tr>
        </table>
        <hr size="2" noshade>
        <table width="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
                <td width="17%" height="2">&nbsp;</td>
                <td width="83%" align="left"><a  style="padding:0px; font-size:11px"href="javascript:window.history.back()">Retornar</a><a href="javascript:window.history.back()"></a>&nbsp;</td>
            </tr>
            <tr>
                <td><input type=button value="Imprimir" onClick="imprimir()" /></td>
                <td>&nbsp;</td>
            </tr>
        </table>
    </body>
</html>